# Binance2QA_FREQUENCY_DICT = {
#     "1m": '1min',
#     "5m": '5min',
#     "15m": '15min',
#     "30m": '30min',
#     "1h": '60min',
#     "1d": 'day',
# }
from app.core.constant_code import ConstantItem


class BinanceFrequency:
    FREQUENCY_1MIN = '1m'

    # K线周期:5分钟
    FREQUENCY_5MIN = "5m"

    # K线周期:15分钟
    FREQUENCY_15MIN = "15m"

    # K线周期:30分钟
    FREQUENCY_30MIN = "30m"

    # K线周期:1小时
    FREQUENCY_1HOUR = "1h"

    # K线周期:4小时
    FREQUENCY_4HOUR = "4h"

    # K线周期:1天
    FREQUENCY_1D = "1day"

    # K线周期:1周
    FREQUENCY_1W = "1W"

    # K线周期:1月
    FREQUENCY_1M = "1M"

    __mapping = {
        "1m": '1min',
        "5m": '5min',
        "15m": '15min',
        "30m": '30min',
        "1h": '1hour',
        "4h": '4hour',
        "1d": '1D',
    }

    @staticmethod
    def trans(frequency):
        return BinanceFrequency.__mapping[frequency]


FREQUENCY_SHIFTING = {
    "1m": 30000,
    "5m": 150000,
    "15m": 450000,
    "30m": 900000,
    "1h": 1800000,
    "1d": 43200000,
}
